package com.hdax.dm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hdax.dm.entity.base.DmImage;
import com.hdax.dm.mappers.DmImageMapper;
import com.hdax.dm.service.DmImageService;
import org.springframework.stereotype.Service;

@Service
public class DmImageServiceImpl extends ServiceImpl<DmImageMapper, DmImage> implements DmImageService {
    @Override
    public DmImage image(Long targetId) {
        QueryWrapper<DmImage> wrapper = new QueryWrapper<>();
        wrapper.eq("type",2L);
        wrapper.eq("category",1L);
        wrapper.eq("targetId",targetId);
        return getOne(wrapper);
    }
}
